package com.mall.web.util;

import java.math.BigDecimal;

public class LongMoneyUtil {
public static String getPageShowLongMoney(Long moeny) {
		
		if (moeny == null || moeny < 0) {
			return "";
		}
		BigDecimal show = (new BigDecimal(moeny.longValue())).divide(new BigDecimal(100));
		return show.doubleValue()+"";
	}
	public static String getPageShowLongMoney(Long moeny,int number) {
		if (moeny == null || moeny < 0) {
			return "";
		}
		BigDecimal show = (new BigDecimal(moeny.intValue())).divide(new BigDecimal(number));
		return show.doubleValue()+"";
	}
	public static void main(String[] args) {
		System.out.println(getPageShowLongMoney(10003l));
	}
	
	/**
	 * 将Long的价格转为integer
	 */
	public static Integer getIntegerMoneyFromLong(Long money){
		Integer newMoney = Integer.parseInt(money.toString())/100;
		return newMoney;
	} 
}
